package com.dsg.entity.apply;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 業務申請單状态
 * </p>
 *
 * @author system
 * @since 2020-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dsg_apply_status")
@ApiModel(value = "DsgApplyStatus对象", description = "業務申請單状态")
public class DsgApplyStatus implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主鍵")
    @TableId("OID")
    private String oid;

    @ApiModelProperty(value = "申請單號")
    @TableField("APP_NO")
    private String appNo;

    @ApiModelProperty(value = "車牌號")
    @TableField("CAR_NO")
    private String carNo;

    @ApiModelProperty(value = "是否入機")
    @TableField("IS_ENTRY")
    private Integer isEntry;

    @ApiModelProperty(value = "是否內審(車資料)")
    @TableField("IS_AUDIT_CAR")
    private Integer isAuditCar;

    @ApiModelProperty(value = "是否內審(人資料)")
    @TableField("IS_AUDIT_CUS")
    private Integer isAuditCus;

    @ApiModelProperty(value = "是否內審(付款資料)")
    @TableField("IS_AUDIT_PAY")
    private Integer isAuditPay;

    @ApiModelProperty(value = "是否check車牌")
    @TableField("IS_CHECK")
    private Integer isCheck;

    @ApiModelProperty(value = "Check车牌批次号")
    @TableField("CHECK_BATCH_NO")
    private String checkBatchNo;

    @ApiModelProperty(value = "Check车牌状态")
    @TableField("CHECK_STATUS")
    private Integer checkStatus;

    @ApiModelProperty(value = "Check车牌审批结果")
    @TableField("CHECK_APPROVAL_RESULT")
    private String checkApprovalResult;

    @ApiModelProperty(value = "是否DDA")
    @TableField("IS_DDA")
    private Integer isDda;

    @ApiModelProperty(value = "是否對單")
    @TableField("IS_MATCH")
    private Integer isMatch;

    @ApiModelProperty(value = "是否扣$1元")
    @TableField("IS_DEDU")
    private Integer isDedu;

    @ApiModelProperty(value = "是否上Form")
    @TableField("IS_FORM")
    private Integer isForm;

    @ApiModelProperty(value = "是否返咭")
    @TableField("IS_RETURN")
    private Integer isReturn;

    @ApiModelProperty(value = "是否派咭")
    @TableField("IS_SEND")
    private Integer isSend;

    @ApiModelProperty(value = "創建人")
    @TableField("CREATER")
    private String creater;

    @ApiModelProperty(value = "創建時間")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATER")
    private String updater;

    @ApiModelProperty(value = "更新時間")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    @ApiModelProperty(value = "是否现有客户")
    @TableField("IS_EXIST_CUS")
    private Integer isExistCus;

    @ApiModelProperty(value = "Check车牌不通过类别")
    @TableField("CHECK_APPROVAL_TYPE")
    private Integer checkAppovalType;

    @ApiModelProperty(value = "Check车牌返回的最后使用时间")
    @TableField("CHECK_LAST_TIME")
    private Date checkLastTime;

    @TableField(value = "CARD_ID")
    @ApiModelProperty(value = "油卡ID")
    private String cardId;

    @ApiModelProperty(value = "申请单状态")
    @TableField("APP_STATUS")
    private int appStatus;

    @ApiModelProperty(value = "申请类型")
    @TableField("APP_TYPE")
    private Integer appType;

    @ApiModelProperty(value = "是否用回旧卡")
    @TableField("IS_USE_OLD")
    private Integer isUseOld;

    @ApiModelProperty(value = "上form編號")
    @TableField("FORM_NO")
    private String formNo;

    @ApiModelProperty(value = "上form日期")
    @TableField("FORM_DATE")
    private Date formDate;

    @TableField(exist = false)
    @ApiModelProperty(value = "DDA编号")
    private String ddaNumber;

    @ApiModelProperty(value = "咭號(解除綁定時寫入卡號)")
    @TableField("CARD_NO")
    private String cardNo;

    @ApiModelProperty(value = "取消原因")
    @TableField("CANCEL_REA")
    private String cancelRea;

    @ApiModelProperty(value = "是否導出")
    @TableField("IS_EXPORT")
    private String isExport;

    /**
     * 未内审
     */
    public static final int IS_AUDIT_NO = 0;
    /**
     * 已内审
     */
    public static final int IS_AUDIT_YES = 1;

    /************************枚舉**********************/
    public enum AppStatus {
        untreated(0), haveInHand(1), success(2), fail(3), yes(1), no(0);
        Integer code;

        AppStatus(int code) {
            this.code = code;
        }

        public Integer getCode() {
            return code;
        }
    }

    /**
     * 否
     */
    public static final int IS_USE_OLD_N = 0;
    /**
     * 是
     */
    public static final int IS_USE_OLD_Y = 1;

    /**
     * 草稿
     */
    public static final int APP_STATUS_DRAFT = 0;
    /**
     * 已提交（未對單）
     */
    public static final int APP_STATUS_COMMITED = 1;
    /**
     * 已取消（拒絕單）
     */
    public static final int APP_STATUS_CANCEL = 2;
    /**
     * 待跟進（對單時）
     */
    public static final int APP_STATUS_TODO = 3;
    /**
     * 已審批（已對單/完核對）
     */
    public static final int APP_STATUS_AUDIT = 4;
}
